package src.main.java.org.stringBuilder;

public class Test {
    public static void main(String[] args) {
        StringBuilder stringBuilder = new StringBuilder("itheima");

        stringBuilder.append(12);
        stringBuilder.append(true);
        //链式编程
        stringBuilder.append("beijing").append("555");
        System.out.println(stringBuilder);

        stringBuilder.reverse();
        System.out.println(stringBuilder);

        //将StringBuilder对象转为String
        String s = stringBuilder.toString();
        System.out.println(s);

    }
}
